package com.qc.entity;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserCashEntity extends BaseEntity {

	private long id;
	private long userId;
	private String realName;//真实姓名
	private double accountBalance;//提现余额
	private double cashBalance;//本次提现金额
	private int state;//状态 0 已完成  1未完成
	private int type;//状态 0 充值  1提现
	private String orderNumber;//订单号
	private String cardNumber;//银行卡号
	private String time;
	private String bank;//开户行
	private String branchAccount;//开户支行
	
	public static UserCashEntity getInstance(ResultSet rs) throws SQLException {
		UserCashEntity entity = new UserCashEntity();
		entity.setId(rs.getLong("id"));
		entity.setUserId(rs.getLong("user_id"));
		entity.setRealName(rs.getString("real_name"));
		entity.setAccountBalance(rs.getDouble("account_balance"));
		entity.setCashBalance(rs.getDouble("cash_balance"));
		entity.setState(rs.getInt("state"));
		entity.setType(rs.getInt("type"));
		entity.setOrderNumber(rs.getString("order_number"));
		entity.setCardNumber(rs.getString("card_number"));
		entity.setTime(rs.getString("time"));
		entity.setBank(rs.getString("bank"));
		entity.setBranchAccount(rs.getString("branch_account"));
		return entity;
	}
	
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public long getUserId() {
		return userId;
	}
	public void setUserId(long userId) {
		this.userId = userId;
	}
	public double getAccountBalance() {
		return accountBalance;
	}
	public void setAccountBalance(double accountBalance) {
		this.accountBalance = accountBalance;
	}
	public double getCashBalance() {
		return cashBalance;
	}
	public void setCashBalance(double cashBalance) {
		this.cashBalance = cashBalance;
	}
	public int getState() {
		return state;
	}
	public void setState(int state) {
		this.state = state;
	}
	public int getType() {
		return type;
	}
	public void setType(int type) {
		this.type = type;
	}
	public String getOrderNumber() {
		return orderNumber;
	}
	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}
	public String getCardNumber() {
		return cardNumber;
	}
	public void setCardNumber(String cardNumber) {
		this.cardNumber = cardNumber;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	public String getBranchAccount() {
		return branchAccount;
	}
	public void setBranchAccount(String branchAccount) {
		this.branchAccount = branchAccount;
	}
	public String getRealName() {
		return realName;
	}
	public void setRealName(String realName) {
		this.realName = realName;
	}
	public String getBank() {
		return bank;
	}
	public void setBank(String bank) {
		this.bank = bank;
	}
	
	
	
}
